package com.thkj.service.impl;

import dp.dao.PagingList;
import com.thkj.framework.base.BaseService;
import com.thkj.service.TblNoticeService;
import com.thkj.entity.TblNotice;

import java.util.Map;

import org.springframework.stereotype.Service;

@Service
public class TblNoticeServiceImpl extends BaseService implements TblNoticeService {
    public void insertTblNotice(TblNotice t){
        dao.insert("com.thkj.mapper.TblNotice.insert", t);
    }

    public int updateTblNotice(TblNotice t){
        int row = dao.update("com.thkj.mapper.TblNotice.update", t);
        return row;
    }

    public int deleteTblNotice(String t ){
        return dao.delete("com.thkj.mapper.TblNotice.delete", t);
    }

    public TblNotice getTblNoticeById(String t){
        return dao.queryForObject("com.thkj.mapper.TblNotice.getById", t, TblNotice.class);
    }

	@Override
	public PagingList<Map> query(int pageIndex, int pageSize, Map<String, Object> param) {
		return dao.queryForPagingList("com.thkj.mapper.TblNotice.query",param, pageIndex, pageSize, Map.class);
	}

}